﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Linq;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace POS
{
    public partial class VirtualKeyboard : DevExpress.XtraEditors.XtraUserControl
    {
        public static string ModificationText;
        public VirtualKeyboard()
        {
            InitializeComponent();
        }

        private void btnLetters_Click(object sender, EventArgs e)
        {
            var button = (SimpleButton)sender;
            textEdit1.Text += button.Text;
        }

        private void btnSpace_Click(object sender, EventArgs e)
        {
            textEdit1.Text += " ";
        }

        private void btnEnter_Click(object sender, EventArgs e)
        {
            ModificationText = textEdit1.Text;

            ListViewItem lvi = new ListViewItem("");
            lvi.SubItems.Add("     - " + ModificationText);

            OrderEntryScreen._Main.listView1.Items.Add(lvi);

            OrderEntryScreen._Main.panelControl1.Controls.Clear();
            OrderEntryScreen._Main.panelControl1.Controls.Add(new MenuItemsButtons(""));
        }

        private void simpleButton32_Click(object sender, EventArgs e)
        {
            String str = textEdit1.Text;
            textEdit1.Text = textEdit1.Text.Remove(str.Length - 1, 1);
        }
    }
}
